<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title th:text="'签到-'+${session.user.getName()}">签到</title>
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/sign_in.css">

    
</head>
<body>
    <ul class="ul">
        <li class="li_home"><a class="a_home" href="/home">首页</a></li>
        <li><a href="/topic">主题</a></li>
        <li><a href="https://www.minecraft.net/zh-hans">Minecraft</a></li>
        <li><a href="https://minecraft.fandom.com/zh/wiki/Minecraft_Wiki">Minecraft Wiki</a></li>
        <div class="minSearch">
            <form action="/topic/search" method="get">
                <div>
                    <input type="text" name="search" placeholder="搜你所想"><button type="submit"></button>
                </div>
            </form>
        </div>
        <li th:if="${session.user != null}" class="li_user"><img th:src="@{'/head_img/'+${session.user.head}}" alt="">
            <div class="menu">
                <p th:text="${session.user.name}">User</p>
                <div class="exp">
                    <input class="expBarValue" type="hidden" th:value="${session.userExp.present}">
                    <div class="expBar"></div>
                </div>
                <span class="level"><span th:text="'Lv:'+${session.user.level}">Lv:1</span>&ensp;&ensp;<span th:text="${session.userExp.exp}+'/'+${session.userExp.maxExp}">0/1</span></span>
                <div class="operate">
                    <a class="ul_border" href="/set">设置</a>
                    <a class="ul_border" href="/signIn">签到</a>
                    <a class="ul_border" href="/exit">退出</a>
                </div>
            </div>
        </li>
        <script src="./js/exp.js"></script>
        <li th:if="${session.user == null}" class="li_user" ><a href="/login">! 请登录 !</a></li>
    </ul>
    <div class="book">
        <div class="top"></div>
        <div class="left"></div>
        <div class="right"></div>
        
        <div class="main">
            <table class="outside">
                <tr>
                    <th th:text="${session.user.name}">name</th>
                    <th><span class="date">0000-00-00</span><span th:if="${session.signInHistories.size() > 13}">可滑动↓</span></th>
                </tr>
                <tr>
                    <td>
                        <div class="main_left">
                            <img th:src="@{'/head_img/'+${session.user.head}}" alt="">
                            <div class="sign btn" onclick="sign()" id="noSign"><span class="status0">29 | 签 到</span><span>今天尚未签到</span></div>
                            <div class="sign btn" id="alreadySign"><span class="status1">29 |已 签 到</span><span th:text="'已连续签到'+${session.user.signcontinuous}+'天'">已连续签到10天</span></div>
                        </div>
                    </td>
                    <td>
                        <div>
                            <table class="inside">
                                <tr>
                                    <th></th>
                                    <th>详细</th>
                                    <th>日期</th>
                                </tr>
                                <tbody>
                                    <tr th:if="${session.signInHistories.isEmpty()}">
                                        <th>天哪！你没有签过到！快签一个</th>
                                    </tr>
                                    <tr th:else="${session.signInHistories.isEmpty()}" th:each="signInHistory : ${session.signInHistories}">
                                        <td>
                                            <span th:utext="'&nbsp;'+${signInHistory.name}">&nbsp;名称</span><br>
                                            <span th:utext="'&emsp;'+${signInHistory.user}">&emsp;user</span>
                                        </td>
                                        <td th:text="${signInHistory.comment}">iiiiiiiiii</td>
                                        <td><span th:text="${signInHistory.date}">0000-00-00 00:00:00</span></td>
                                    </tr>
                                </tbody>
                                
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <div class="bottom"></div>
    </div>
    <script src="./js/sign_in.js"></script>
</body>
</html>